package com.sghj.utils.Validate.password;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author xrx
 * @Date 2022/3/7
 * @apiNote
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER })
@Constraint(validatedBy = {PasswordValidator.class})
public @interface Password {
    String message()

    //default "密码长度为8-20位，且由数字、字母、除空格外的符号组成";
     default "密码长度为8-20位，且由数字、大小写字母、除空格外的符号组成";
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
